Configurable and dynamic transformation of web content

ABSTRACT

Dynamically transforming web content is described. An HTTP request is received from an Internet client. The web resource identified in the HTTP request is accessed. The content of the web resource is analyzed. A set of transformation instructions are applied on a set of identified portions of the content of the web resource. Each applied transformation instruction includes logic to locate and manipulate at least an identified portion of the content, and at least one of the applied transformation instructions is a client-side script transformation instruction that performs one or more of: modify a client-side script included in the content, remove a client-side script included in the content, and add a client-side script to the content. An HTTP response is rendered that includes the results of the applied transformation instructions and further includes those portions of the content that were not manipulated by a transformation instruction. The response is then transmitted to the Internet client.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Application No.61/279,596, filed Oct. 23, 2009, which is hereby incorporated byreference.

FIELD

Embodiments of the invention relate to the field of data processingsystems; and more specifically, to a configurable and dynamictransformation of web content.

BACKGROUND

Mobile web access is becoming a common way for viewing websites as moremobile devices are sold that are capable of accessing the web. Sincewebsites are typically designed to be rendered on a non-mobile browseron a computing device (e.g., a desktop, laptop, etc.), they may not beoptimally designed for viewing on a mobile browser of a mobile device(e.g., a mobile device such as a smartphone has a limited viewing area).Many websites have a corresponding mobile version that is converted formobile browsers.

One mobile conversion technique involves the use of automaticallytranscoding a page when requested by a mobile browser. This automatictranscoding typically removes all client-side scripts (e.g., JavaScript,VBScript) and does not support cookies. Thus, unless the web page thatis being transcoded is relatively simple, the automatic transcoder willnot include the same functionality as its non-mobile version. Inaddition, the automatic transcoding is typically not customizable byowners and/or operators of the mobile web page. Thus, the same automatictranscoding rules are typically applied to each web page regardless ofthe characteristics of that web page, which can lead to widely varyingresults.

Another mobile conversion technique involves the use of custom templatesfor a web page (e.g., an HTML page). For example, an operator selectselements from the non-mobile HTML web page and creates a custom mobiletemplate to display those elements. The custom templates need to becreated for each web page of a website. Upon receiving a request from amobile browser for that web page, the HTML of the page is run through anextraction process (sometimes referred to as a scraping process) thatrequires custom extraction code to extract the specified elements andinsert them into the custom HTML template for that web page. If theextraction process cannot find the elements it expects, the result iseither missing information or an error page. Only those elements whichare extracted to fit the template will appear in the mobile version ofthe page. If a new feature is added to the non-mobile web page, a newtemplate (or a modified template) must be created and new extractioncode must be written in order for that feature to be added to the mobileweb page. In addition, if an element is moved on the non-mobile page,the extraction code needs to be updated with the new information;otherwise the mobile-web page will display with missing information oran error page. Thus the use of custom templates requires a significantamount of configuration. In addition, most optimization techniques thatuse custom templates do not include functionality for client-sidescripts or support the cookies issued by the origin server.

SUMMARY

Dynamically transforming web content is described herein. An HTTPrequest is received from an Internet client and the web resource that isidentified in the HTTP request is accessed. The content of the webresource is analyzed and a set of transformation instructions areapplied on a set of identified portions of the content of the webresource. Each applied transformation instruction includes logic tolocate and manipulate at least an identified portion of the content, andat least one of the applied transformation instructions is a client-sidescript transformation instruction that performs one or more of: modify aclient-side script included in the content, remove a client-side scriptincluded in the content, and add a client-side script to the content. AnHTTP response is rendered that includes the results of the appliedtransformation instructions and further includes those portions of thecontent that were not manipulated by a transformation instruction. Theresponse is then transmitted to the Internet client.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention may best be understood by referring to the followingdescription and accompanying drawings that are used to illustrateembodiments of the invention. In the drawings:

FIG. 1 illustrates an exemplary system for dynamically rehosting awebsite according to one embodiment of the invention;

FIG. 2 is a flow diagram illustrating exemplary operations for a dynamicweb content transformation server modifying requests according to oneembodiment of the invention;

FIG. 3 illustrates an exemplary request according to one embodiment;

FIG. 4 illustrates an exemplary modified request according to oneembodiment of the invention;

FIG. 5 is a flow diagram illustrating exemplary operations for a dynamicweb content transformation server modifying responses received from anorigin server according to one embodiment of the invention;

FIG. 6 illustrates an exemplary response according to one embodiment.

FIG. 7 illustrates an exemplary client-side script to override thefunctionality of an existing Ajax request object included in theresponse that, when executed by an Internet client, rewrites URLs torefer to the dynamic web content transformation server;

FIG. 8 illustrates an exemplary transformation editor according to oneembodiment;

FIG. 9 illustrates an exemplary URL mapping configuration windowaccording to one embodiment;

FIG. 10 is a flow diagram illustrating exemplary operations performed bythe dynamic web content transformation server to dynamically transformweb content according to one embodiment;

FIG. 11 illustrates an exemplary HTML document;

FIG. 12 illustrates an exemplary CSS document referred in the HTMLdocument illustrated in FIG. 11;

FIG. 13 illustrates an exemplary rendered page of the HTML documentillustrated in FIG. 11;

FIG. 14 illustrates the exemplary HTML document illustrated in FIG. 11after a RemoveElements transformation instruction has been appliedaccording to one embodiment;

FIG. 15 illustrates the rendered view of the HTML document illustratedin FIG. 14;

FIG. 16 illustrates the exemplary HTML document illustrated in FIG. 11after the MoveBefore transformation instruction has been appliedaccording to one embodiment;

FIG. 17 illustrates the rendered view of the HTML document illustratedin FIG. 17;

FIG. 18 illustrates the exemplary HTML document illustrated in FIG. 11after a RemoveCSS transformation instruction has been applied accordingto one embodiment;

FIG. 19 illustrates the rendered view of the HTML document illustratedin FIG. 18;

FIG. 20 illustrates a exemplary alternative CSS document;

FIG. 21 illustrates the exemplary HTML document illustrated in FIG. 11after an AddCSS transformation instruction has been applied according toone embodiment;

FIG. 22 illustrates the rendered view of the HTML document illustratedin FIG. 21;

FIG. 23 illustrates the exemplary HTML document illustrated in FIG. 11after an InlineCSS transformation has been applied according to oneembodiment;

FIG. 24 illustrates the rendered view of the HTML page illustrated inFIG. 23;

FIG. 25 illustrates an exemplary HTML document source where an Accordiontransformation instruction will be applied according to one embodiment;

FIG. 26 illustrates a rendered view of the exemplary HTML documentillustrated in FIG. 25;

FIGS. 27A-B illustrate the exemplary HTML document of FIG. 25 after theAccordion transformation is applied according to one embodiment;

FIG. 28 illustrates a rendered view of the HTML document illustrated inFIG. 25 after the Accordion transformation is applied according to oneembodiment;

FIG. 29 illustrates a rendered view of the HTML document of FIG. 25after the Accordion transformation is applied and after a user hasselected one of the headers according to one embodiment;

FIG. 30 is a flow diagram that illustrates exemplary operationsperformed on an origin server for dynamically transforming web contentaccording to one embodiment; and

FIG. 31 is a block diagram illustrating an exemplary computer systemwhich may be used in some embodiments.

DESCRIPTION OF EMBODIMENTS

In the following description, numerous specific details are set forth.However, it is understood that embodiments of the invention may bepracticed without these specific details. In other instances, well-knowncircuits, structures and techniques have not been shown in detail inorder not to obscure the understanding of this description. Those ofordinary skill in the art, with the included descriptions, will be ableto implement appropriate functionality without undue experimentation.

References in the specification to “one embodiment,” “an embodiment,”“an example embodiment,” etc., indicate that the embodiment describedmay include a particular feature, structure, or characteristic, butevery embodiment may not necessarily include the particular feature,structure, or characteristic. Moreover, such phrases are not necessarilyreferring to the same embodiment. Further, when a particular feature,structure, or characteristic is described in connection with anembodiment, it is submitted that it is within the knowledge of oneskilled in the art to effect such feature, structure, or characteristicin connection with other embodiments whether or not explicitlydescribed.

In the following description and claims, the terms “coupled” and“connected,” along with their derivatives, may be used. It should beunderstood that these terms are not intended as synonyms for each other.“Coupled” is used to indicate that two or more elements, which may ormay not be in direct physical or electrical contact with each other,co-operate or interact with each other. “Connected” is used to indicatethe establishment of communication between two or more elements that arecoupled with each other.

Dynamically Rehosting Web Content

A method and apparatus for dynamically rehosting web content isdescribed. In one embodiment, responsive to a dynamic web contenttransformation server receiving from an Internet client an HTTP requestfor a resource that is hosted at an origin server, the dynamic webcontent transformation server modifies the host header field in therequest to refer to the origin server and transmits the modified HTTPrequest to the origin server. The dynamic web content transformationserver receives an HTTP response from the origin server that includesthe requested resource. The dynamic web content transformation serveranalyzes the resource and determines whether each URL reference in theresource should refer to either the origin server or to the dynamic webcontent transformation server. For those URL references that are torefer to the origin server and are relative links, the dynamic webcontent transformation server transforms those URL references such thatthey refer to the origin server (e.g., by inserting the origin server'sURL and path of the resource). Those URL references that are to refer tothe origin server and are absolute links are not modified. For those URLreferences that are to refer to the dynamic web content transformationserver and are absolute links, the dynamic web content transformationserver transforms those URL references to refer to the dynamic webcontent transformation server (e.g., by transforming them into a newabsolute URL that refers to the dynamic web content transformationserver instead of the origin server). Those URL references that are torefer to the dynamic web content transformation server and are relativelinks are not modified. The dynamic web content transformation serverrenders an HTTP response with the modifications to the resource, andtransmits the modified HTTP response to the Internet client.

In one embodiment, an operator of the dynamic web content transformationserver configures the dynamic web content transformation server withrehosting transformation instructions that indicate whether the URL(s)included in the response should refer to the origin server or to thedynamic web content transformation server. In one embodiment therehosting transformation instructions also include logic to locate andmanipulate the URL(s) included in the response.

In one embodiment where there is at least one URL reference that iscontained within a client-side script (e.g., JavaScript, VB Script)included in the resource and a transformation instruction indicates thatthe URL reference should refer to the dynamic web content transformationserver, the dynamic web content transformation server applies thattransformation instruction to override the original client-side scriptwith a new client-side script that, when executed by the Internetclient, dynamically rewrites the URL reference to refer to the dynamicweb content transformation server. In one embodiment this allows Ajaxrequests to passthrough the dynamic web content transformation server.

In an embodiment where the request includes a cookie that refers to adomain associated with the dynamic web content transformation server,the dynamic web content transformation server rewrites the cookie domainto refer to the domain associated with the origin server. When theresponse includes a Set-Cookie header that includes a domain parameterthat refers to a domain associated with the origin server, the dynamicweb content transformation server transforms the domain parameter torefer to a domain associated with the dynamic web content transformationserver.

In one embodiment, the domain associated the origin server is asubdomain of the domain associated with the dynamic web contenttransformation server. For example, the hostname of the dynamic webcontent transformation server is added to the end of the domain part ofthe original domain associated with the origin server. By way ofexample, an origin server that is reached with the URLhttp://example.com is mapped to the URL http://example.moovweb.com thatresolves to the dynamic web content transformation server. As anotherexample, an origin server that is reached with the URLhttp://mail.example.com is mapped to the URLhttp://mail.example.moovweb.com that resolves to the dynamic web contenttransformation server. As another example, an origin server that isreached with the URL http://example.com/?q=help is mapped to the URLhttp://example.moovweb.com/?q=help. As yet another example, an originserver that is reached with the URL http://example.org is mapped to theURL http://example.org.moovweb.com. As yet another example, an originserver that is reached with the URL http://example.com/example is mappedto the URL http://example.moovweb.com/example. Thus in this embodiment,the subdomains are preserved in the URL mapping scheme and therefore thecookies are preserved.

In one embodiment at least a portion of a website's domain, subdomain,and/or path is rehosted in order for the dynamic web contenttransformation server to dynamically transform non-mobile pages of thewebsite's domain, subdomain, and/or path into mobile versions.

FIG. 1 illustrates an exemplary system for dynamically transforming webcontent according to one embodiment. For example, the system in FIG. 1can dynamically rehost at least a portion of one or more website'sdomain, subdomain, and/or path. The system includes the computing device105 that implements the Internet client 110, the dynamic web contenttransformation server 120, the origin server 130, and the transformationinstructions database 140. The system also includes the transformationinstruction editor 190, which will be described in more detail laterherein, and optionally includes the cache server 150 and the reportdatabase 195.

The Internet client 110 is an entity that makes requests over computernetworks (e.g., a web browser controlled by a user, an automatedsoftware program such as a web crawler) for resources (e.g., HTML pages,binary data, a JavaScript file, a CSS (Cascading Style Sheets) file,etc.). In one embodiment the computing device 105 is a non-desktop ornon-laptop personal computer such as a mobile computing device (e.g., amobile phone, smartphone, PDA, portable media player, GPS device, gamingdevice, etc.), a kiosk, a set top box, or other device that has anon-laptop or non-desktop form factor. In one embodiment the Internetclient 110 is a mobile browser. It should be understood that a mobilecomputing device such as a mobile phone or smartphone has differentcharacteristics than computing devices such as workstations or laptops.For example, a mobile computing device such as a mobile phone orsmartphone typically has a relatively small display.

The dynamic web content transformation server 120 is coupled between thecomputing device 105 and the origin server 130 and dynamicallytransforms at least part of the website. In one embodiment, the dynamictransformation includes dynamically rehosting at least part of thewebsite on behalf of the origin server 130. For example, in oneembodiment the dynamic web content transformation server 120 operates inreal-time and receives requests for resources (e.g., HTTP requests forweb pages) hosted on the origin server 130 and can initiate requests toother servers (external to the origin server 130). Responses from theorigin server 130 (e.g., HTTP responses) may also pass through thedynamic web content transformation server 120. The origin server 130 isa server that hosts resources for a website. By way of example, theorigin server 130 is reached at the URL address http://example.com andthe dynamic web content transformation server 120 is reached at the URLaddress http://example.moovweb.com with an alias ofhttp://m.example.com. In one embodiment, an administrator of the domainexample.com changes the domain record such that http://m.example.compoints to the dynamic web content transformation server 120. Thus, byway of example, when the Internet client 110 makes a request on thedomain m.example.com (or example.moovweb.com), the request resolves tothe dynamic web content transformation server 120. It should beunderstood that although FIG. 1 illustrates a single computing device105 coupled with the origin server 130, typically there are manycomputing devices that issue requests and receive replies from thedynamic web content transformation server 120. It should also beunderstood that the dynamic web content transformation server 120 may beat least partially rehosting websites on behalf of multiple originservers belonging to multiple websites.

In one embodiment, the dynamic web content transformation server 120provides the dynamic web content transformation as a service on behalfof the domain hosted at the origin server 120 (and potentially otherdomains hosted at different servers). In such an embodiment, the dynamicweb content transformation server 120 is not owned or directlycontrolled by the owner(s)/operator(s) of the domains it is providingcontent transformation services for. In another embodiment, the dynamicweb content transformation server 120 is included as part of aninfrastructure of a domain owner, and may be included as part of anorigin web server. In such an embodiment, the dynamic web contenttransformation server 120 typically does not provide a third partytransformation service for other domains.

In one embodiment, the dynamic web content transformation server 120dynamically transforms requests for resources issued by the Internetclient 110. FIG. 2 is a flow diagram illustrating exemplary operationsfor a dynamic web content transformation server transforming requestsaccording to one embodiment. The operations of FIG. 2 will be describedwith reference to the exemplary embodiment of FIG. 1. However, it shouldbe understood that the operations of FIG. 2 can be performed byembodiments of the invention other than those discussed with referenceto FIG. 1, and the embodiments discussed with reference to FIG. 1 canperform operations different than those discussed with reference to FIG.2.

With reference to FIG. 1, at a time 1, the Internet client 110 issuesthe request 180. In one embodiment, the request 180 (e.g., an HTTPrequest) is for a resource originally hosted by the origin server 130that is designed to be rendered on a non-mobile Internet client. By wayof example, FIG. 3 illustrates an exemplary request 180. As illustratedin FIG. 3, the exemplary request 180 is an HTTP POST request thatincludes information for the HTML file/activities/index.html at the hostwww.example.moovweb.com as indicated by the host header field 310. Inone embodiment, unless that HTML file is cached by the dynamic webcontent transformation server 120, which will be described in greaterdetail later herein, the dynamic web content transformation server 120does not have local access to that HTML file and therefore transmits therequest, on behalf of the Internet client 110, to the origin server 130.Although the request 180 is for an HTML file, it should be understoodthat this is exemplary as the requests may be for a different type ofresource. In addition, although the request 180 is a POST request, itshould be understood that other request methods may be received andprocessed by the dynamic web content transformation server 120 (e.g.,GET, HEAD, PUT, etc.). It should also be understood the header of therequest 180 can include further information (e.g., User-Agent, Date, orother header fields defined RFC 2616 or RFC 4229).

The request 180 can be issued from the Internet client 110 directly tothe dynamic web content transformation server 120 (e.g., a user canenter in the URL in their browser that points to the dynamic web contenttransformation server 120) or be issued as a result of being redirectedby the origin server 130. For example, the origin server 130 maydetermine that the resource that is returned should be a mobile versionof that resource. For example, the website associated with the originserver may use a particular naming convention for mobile versions of itspages (e.g., http://m.example.com may refer to the mobile version ofhttp://example.com) such that if the request matches that namingconvention the request is for a mobile version of the resource. Theorigin server 130 may also determine that the request is for a mobileversion (or from a mobile device) based on the User-Agent of theInternet client 110 (the User-Agent may identify that the computingdevice 105 is a mobile device and/or using a mobile-browser). As anotherexample, the origin server 130 may also determine that the request isfor a mobile version (or from a mobile device) based on the value of acookie being sent by the computing device 105. If the request is from amobile device and/or is requesting a mobile version of the resource,then the origin server 130 can redirect the Internet client 110 to thedynamic web content transformation server 120.

With reference to FIG. 2, the dynamic web content transformation server120 receives the request 180, issued from the Internet client 110, atoperation 210. Flow moves to block 220. At a time 2, the request module160 transforms the request and flow moves to operation 230. Withreference to FIG. 220, the request module 160 modifies the value in thehost header field in the request 180 to refer to the origin server 130.For example, with reference to FIG. 3, the value in the host headerfield 310 is modified from www.example.moovweb.com to www.example.com.FIG. 4 illustrates the modified request 182 with the modified value ofthe host header field 310.

In one embodiment, if the request 180 includes a cookie that has acookie domain of www.example.moovweb.com, the dynamic web contenttransformation server 120 modifies the cookie domain to refer towww.example.com. With respect to FIG. 2, at operation 230, the dynamicweb content transformation server 130 determines whether the requestincludes a cookie. If the request includes a cookie, then flow moves tooperation 240 and the dynamic web content transformation server 120transforms the cookie domain to refer to the origin server and flowmoves to block 250. If the request does not include a cookie, then flowmoves to block 250. At a time 3 and with respect to operation 250, thedynamic web content transformation server 120 transmits the transformedrequest 182 to the origin server 130.

The origin server 130 processes the request 182 and, at a time 4,transmits the response 184 to the dynamic web content transformationserver 120. In one embodiment, the response 184 is designed to berendered on a non-mobile Internet client and includes the entire HTML,CSS, JavaScript and/or other elements that are natively in the response184. FIG. 6 illustrates an exemplary response 184. As illustrated inFIG. 6, the response 184 includes an HTML document, however it should beunderstood that responses can take on different forms depending on therequest (e.g., binary data, JSON (JavaScript Object Notation) data, XML(Extensible Markup Language) data, a JavaScript file, a CSS file, RSS(Really Simple Syndication) feeds, Ajax responses, web services, etc.).

The dynamic web content transformation server 120 dynamically transformsresponses issued by the origin server 130. For example, in oneembodiment, at least some of the elements of the responses that includea URL are automatically transformed such that they refer to the dynamicweb content transformation server 120. Thus at a time 5, the responsemodule 170 dynamically transforms the response 184 such that at leastsome of the elements of the response refer to the dynamic web contenttransformation server 120 instead of the origin server 130.

In one embodiment, dynamically transforming the response 184 begins withthe entire response (e.g., the entire HTML, CSS (if included),client-side scripts (if included), Ajax requests (if included), etc.)and the dynamic web content transformation server 120 dynamicallytransforms selective element(s) of the response. In one embodiment, thedynamic web content transformation server 120 applies one or moretransformation instructions to the response to determine whichelement(s) to transform and how those element(s) should be transformed.Each transformation instruction includes logic to locate and manipulateat least an identified portion of the content from an input source(typically from the response). For example, the response is analyzed andcompared with one or more transformation instructions to determinewhether one or more transformation instruction should be applied andwhat element(s) they should be applied to.

The transformation instructions may include rehosting transformationinstructions to transform at least some of the elements in the response184 that include a URL to refer to the dynamic web contenttransformation server 120 instead of the origin server 130. Therehosting transformation instructions also can support for rehostingclient-side scripts (e.g., Ajax requests). By way of example, rehostingcertain element(s) of a site allows the reuse of existing customerbusiness logic for the rehosted resource (which may be formatted formobile use). For example, if a web page has a shopping cart feature witha purchasing backend, that feature can automatically be included on themobile version of that web page and leverage the existing purchasingbackend.

Those element(s) of the response 184 that are not transformed (e.g.,they do not match any transformation instructions) are included in thetransformed response. As a result, unlike an optimization technique thatuses custom templates, in embodiments of the invention described herein,when a feature is added to the resource hosted at the origin server(e.g., a new feature added to the page example.com), that feature willbe included on the transformed response (unless there is atransformation instruction that matches that new feature and removesthat feature). For example, new features added to a web page at theorigin server (e.g., features added to the non-mobile web page)typically will appear on the transformed web page without requiringfurther configuration. In addition, the dynamic transformation of theresponse described herein includes support for client-side scripts(including Ajax requests) and/or cookies. For example, an Ajax searchfeature of a non-mobile web page will work on the dynamicallytransformed mobile web page.

FIG. 5 is a flow diagram illustrating exemplary operations for a dynamicweb content transformation server dynamically transforming responsesaccording to one embodiment. The operations of FIG. 5 will be describedwith reference to the exemplary embodiment of FIG. 1. However, it shouldbe understood that the operations of FIG. 5 can be performed byembodiments of the invention other than those discussed with referenceto FIG. 1, and the embodiments discussed with reference to FIG. 1 canperform operations different than those discussed with reference to FIG.5.

With reference to FIG. 5, at operation 510, the dynamic web contenttransformation server 120 receives the response 184 from the originserver 130. Flow moves from operation 510 to operation 515. At operation515, the response module 170 analyzes the response 184 and determinesthat it includes at least one URL reference. For example, the responsemodule 170 scans the response 184 to detect URLs that are located withinone or more of: the “action” attribute of a <FORM> element; the “href”attribute of an <A> element and/or a <LINK> element; the “src” attributeof an <IMG>, <SCRIPT>, <FRAME>, and/or <IFRAME> element; the “url( )”value in a CSS style value and/or CSS @import reference; and URL(s) inscripts (such as JavaScript and VBScript). Flow moves from operation 515to operation 520 and the response module 170 accesses a detected URLreference and flow moves to operation 525.

At operation 525, the response module 170 determines whether that URLreference should refer to the origin server 130 (thereby bypassing thedynamic web content transformation server 120) or to the dynamic webcontent transformation server 120 (thereby passing through the dynamicweb content transformation server 120). In one embodiment, all URL(s) inthe response 184 should refer to the dynamic web content transformationserver 120. In another embodiment, an operator of the dynamic webcontent transformation server 120 configures one or more rehostingtransformation instructions that indicate whether the URL(s) included inthe response should refer to the origin server 130 or to the dynamic webcontent transformation server 120. In one embodiment, these rehostingtransformation instructions can be configured differently for differentelements. By way of example, the rehosting transformation instructionscan be configured such that image assets or CSS files refer to theorigin server 130 while URLs in scripts, anchor tags, form actions,and/or other HTML elements that include URL attributes refer to thedynamic web content transformation server 120. With reference to theexemplary response 184 illustrated in FIG. 6, rehosting transformationinstructions have been configured such that all images (as indicated byan <IMG> element) should refer to the origin server 130 and all anchors(as indicated by an <A> element) should refer to the dynamic web contenttransformation server 120 thereby allowing a user to navigate the webwith those requests going through the dynamic web content transformationserver 120 (without the user having to change their browser settings toapply a proxy).

Some responses may include a reference to an external client-side scriptfile (e.g., JavaScript include via a <SCRIPT> element with a “src”attribute). In one embodiment, the rehosting transformation instructionsare configured to indicate that external client-side script files shouldrefer to the dynamic web content transformation server 120 (thus passingthrough the server 120). Other types of assets can also passthrough thedynamic web content transformation server 120 (e.g., forms, style tags,CSS import statements, other types of JavaScript commands such aswindow.location=, meta tags, iframe tags, frameset tags, etc.).

In one embodiment, different rehosting transformation instructions canbe applied to different domains, subdomains, and/or paths. For example,different rehosting transformation instructions can be applied to a mainpage of a website as compared to the rehosting transformationinstructions that are applied to a checkout page of a website. In oneembodiment, the rehosting transformation instructions are stored in thetransformation instructions database 140 and accessed by the responsemodule 170 to determine whether the URL reference should either refer tothe origin server 130 or to the dynamic web content transformationserver 120, although in other embodiments the rehosting transformationinstructions are stored locally on the server 120.

With reference back to FIG. 5, if the rehosting transformationinstructions indicate that the URL should refer to the origin server130, then flow moves to operation 530. If the rehosting transformationinstructions indicate that the URL should refer to the dynamic webcontent transformation server 120, then flow moves to operation 540.

At operation 530 (the URL is to point to the origin server 130), theresponse module 170 determines whether the URL is an absolute URL (or atleast including a domain) or is a relative URL that lacks a domain. Forexample, with reference to FIG. 6, the URL 660 is a relative URL and theURL 665 is an absolute URL. As another example, the URL string locatedwithin the client-side script 630 includes a domain so it is treated asan absolute URL. The URL string located within the client-side script640 does not include a domain so it is treated as a relative URL. Sincethe URL is to point to the origin server 130, it does not need to bemodified if it is an absolute URL. However, if the URL is a relativeURL, then it needs to be transformed such that it will refer to theorigin server 130 (e.g., by transforming it into an absolute URL thatrefers to the origin server 130). It should be understood that relativeURLs that are not modified will refer to the dynamic web contenttransformation server 120. Thus, with reference to FIG. 6, the absoluteURL 665 is not modified but the relative URL 660 needs to be transformedinto an absolute URL pointing to the origin server 130.

If the URL is a relative URL, then flow moves to operation 535 and theresponse module 170 transforms the relative URL to refer to the originserver 130. For example, the URL is transformed into an absolute URLthat refers to the origin server 130 by inserting the origin server'sURL and path. For example, with reference to the relative URL 660, it istransformed from img/batman.png intohttp://example.com/activities/img/batman.png. Flow moves from operation535 to operation 550.

The response 184 can include client-side scripts (e.g., JavaScript,VBScript, etc.) that, when executed by the Internet client 110,generates the URL. For example, with reference to FIG. 6, the final URLvalue that results from the client-side script 640(window.location=“buytickets/”+movieName) being executed on the Internetclient 110 will occur after the response 184 has passed through thedynamic web content transformation server 120 (in this example the finalURL depends on the value of movieName). As a result, the dynamic webcontent transformation server 120 cannot determine the absolute URLvalue directly from the response 184. In such a case, in one embodimentthe response module 170 parses the script and replaces or modifies theappropriate URL string to cause the URL to refer to the origin server130.

If the URL is an absolute URL, then flow moves to operation 550. Itshould be understood that the absolute URL is not modified. At operation550, the response module 170 determines whether there is another URLreference in the response. If there is, then flow moves back tooperation 520 and the next URL reference is accessed. If there is not,then flow moves to operation 555.

Referring back to operation 540 (the URL is to point to the dynamic webcontent transformation server 120), the response module 170 determineswhether the URL is an absolute URL. For example, with reference to FIG.6, the URL 670 is a relative URL and the URL 675 is an absolute URL.Since the URL is to point to the dynamic web content transformationserver 120, it does not need to be modified if it is a relative URL.However, if the URL is an absolute URL, then it needs to be transformedinto an absolute URL that points to the dynamic web contenttransformation server 120 or alternatively transformed into a relativeURL. Thus, with reference to FIG. 6, the relative URL 670 is notmodified but the absolute URL 675 needs to be transformed such that itwill point to the dynamic web content transformation server 120.

If the URL is an absolute URL (or at least includes a domain in case theURL is within a client-side script), then flow moves to operation 545and the response module 170 transforms the URL to refer to the dynamicweb content transformation server 120. For example, with reference tothe absolute URL 665, the response module 170 transforms it fromhttp://example.com/fantasticfour into http://example.moovwebcom/fantasticfour. Thus, when the Internet client 110 follows the anchortag, the request will be directed at the dynamic web contenttransformation server 120.

If the URL reference is within a client-side script, in one embodimentthe response module 170 parses the client-side script to change the URLreference itself to replace or modify the appropriate URL string to makeit refer to the dynamic web content transformation server 545. Forexample, the response module 170 modifies the string“http://example.com/activities/buytickets/” in the client-side script630 to “http://example.moovweb.com/activities/buytickets”.

In another embodiment where the URL reference is within a client-sidescript, the response module 170 overrides the native client-side scriptoperations of that client-side script with new operations that rewritethe URL to refer to the dynamic web content transformation server 120when executed by the Internet client 110. By way of example, an operatorcan configure the rehosting transformation instructions such that Ajaxrequests passthrough the dynamic web content transformation server 120.For example, with reference to FIG. 6, the function getShowtimes 650 isan Ajax request. In one embodiment, a new client-side script is added tothe response that, when executed by the Internet client 110, replacesthe functionality of the existing XMLHttpRequest.open ( ) function (or asimilar object such as ActiveXObject.open ( )) with a customizedXMLHttpRequest.open ( ) function (or similar object such asActiveXObject.open ( )) that dynamically rewrites the URL(s) in theopen( ) function to refer to the dynamic web content transformationserver 120 instead of the origin server 130. Thus any Ajax requests madeby that page will be transmitted to the dynamic web contenttransformation server 120 instead of the origin server 130.

FIG. 7 illustrates an exemplary client-side script 710 to override thefunctionality of the existing Ajax request object XMLHttpRequest.open () function included in the response 184 such that, when executed by theInternet client 110, it rewrites URLs to refer to the dynamic webcontent transformation server 120 instead of the origin server 130. Thefunction moov_passthrough_link rewrites absolute URLs that refer to theorigin server 130 to refer to the dynamic hosting server 120. In oneembodiment relative URLs are not rewritten since they will already referto the dynamic web content transformation server 120, however in anotherembodiment relative URLs are rewritten to absolute URLs that refer tothe origin server 130. The function moov_open_passthrough ( ) replacesthe default open ( ) function of the XMLHttpRequest object and, whenexecuted by the Interne client 110, sends a URL to the functionmoov_passthrough_link before calling the newly added XMLHttpRequest open( ) function.

In some situations the response 184 includes a client-side script thatgenerates a URL and adds it to the page. For example, client-sidescripts for web analytics may commonly add a small image to the page. Inone embodiment, the client-side script is rewritten to be rehosted bythe dynamic web content transformation server 120 and the link ismodified within the rehosted script such that when it executes on theInternet client 110, it will add the link (e.g., a link to an image)that refers to the dynamic web content transformation server 120.

Referring back to FIG. 5, after each URL reference in the response 184is processed by the response module 170, flow moves to operation 555 andthe response module 170 determines whether the response 184 includes aSet-Cookie header. If the response 184 does not include a Set-Cookieheader, then flow moves to operation 565 and the transformed response istransmitted to the Internet client 110. However, if the response 184includes a Set-Cookie header, then flow moves to operation 560 and thecookie domain is transformed to refer to the dynamic web contenttransformation server 120. For example, with reference to FIG. 6, thecookie domain 620 (which indicates a domain of .example.com) is changedto refer to the dynamic web content transformation server 120 (e.g.,.example.moovweb.com). Changing the cookie domain ensures that thedynamic web content transformation server 120 will receive the cookiefrom the Internet client 110.

Thus, in one embodiment, cookies are supported by the dynamic webcontent transformation system. In addition, these cookies pass throughthe dynamic web content transformation server 120 (both from the originserver 130 and the Internet client 110). Thus the same cookies can beused between the mobile web page (e.g., the transformed response 186) aswell as the corresponding non-mobile version of that web page. Forexample, if a user is logged into the mobile web page located atm.example.com and clicks on a “Full Site” link (which causes theInternet client to connect to the corresponding non-mobile version atexample.com), the user will still be logged in. In this way, the cookiescan be visible to both the mobile version of a website as well as thenon-mobile version of the website.

Flow then moves to operation 565 and the transformed response istransmitted to the Internet client 110. With respect to FIG. 1, at atime 6, the transformed response 186 is transmitted to the Internetclient 110. In the example described above, the transformed responsewill be a modified version of an HTML web page; however it should beunderstood that the transformed response may be of a different type ofdata (e.g., XML, RSS feeds, etc.). It should also be understood that thetransformed response may include a type of data that is different thanthe input type.

In one embodiment, the portion(s) of the response which have not beentransformed (e.g., they did not match the rules for a rehostingtransformation instruction) are included in the transformed response186. Thus, unlike mobile conversion techniques that require the use ofcustom templates and custom extraction code to transform the content,element(s) that do not match a transformation instruction are includedin the rendered response (in the case of a custom template technique,elements that are not extracted and put in a template are not includedin the response).

In some embodiments, the dynamic web content transformation system alsoincludes the ability to cache resources. In such an embodiment, thedynamic web content transformation server 120 is coupled with the cacheserver 150. The dynamic web content transformation server 120 can cachedata it receives from the origin server 130 and can also cache theresult of its own operations. For example, the dynamic web contenttransformation server 120 can cache the transformed response 186 in thecache server 150. In some embodiments, only certain modifications arecached in the cache server 150, which can be configured by an operatorof the dynamic web content transformation server.

Configurable and Dynamic Transformation of Internet Content

In one embodiment, the dynamic web content transformation server 120dynamically transforms selective elements and/or attributes of selectiveelements of the response in order to format, optimize, modify, remove,and/or add new elements to the response prior to transmitting thetransformed response to the Internet client. These transformationoperations may be performed in addition to the rehosting transformationoperations or may be performed without performing any rehostingtransformation operations. In one embodiment, an operator configures aset of instructions to dynamically transform the response.

In one embodiment, the transformation instructions convert a resource ofone type suitable for viewing/use on a class of device (e.g., anon-mobile resource for viewing/use on a device such as a desktop orlaptop) into a form suitable for viewing/use on a different class ofdevice (e.g., into a form suitable for viewing/use on a mobile browserof a computing device, into a form suitable for viewing/use on a set-topbox, kiosk, or other class of computing device that has different userinterface characteristics and/or device capabilities than the resourcewas originally designed for).

For example, a set of CSS transformation instructions may be configuredby a user to modify, remove, and/or add CSS files in the response. Byway of example, the set of CSS transformation instructions may includeinstructions to: add a custom CSS file to a web page to produce a newdesign or style (e.g., one optimized for a mobile browser on a mobiledevice having a particular screen size), remove an existing CSS fileincluded in the response, and/or remove particular CSS attributes orattributes that meet a certain criteria (e.g., remove one or more of theSTYLE and LINK[rel=‘stylesheet’] tags from the response, remove the‘!Important’ flags from the CSS, remove a LINK tag whose HREF matches agiven path, remove a CSS property from a CSS file, etc.).

As another example, a set of visual formatting transformationinstructions may be configured by a user to modify the visual appearanceof the response when rendered. By way of example, the set of visualformatting transformation instructions may include instructions to: hidesome of the content of the web page behind a button, which when selectedby a user, causes the hidden content to be displayed, hide a list ofcontent behind a header which, when selected by a user, causes thecontent to be displayed, and/or resize an image to increase the downloadspeed, remove one or more elements from an HTML document, remove one ormore attributes of one or more elements of an HTML document, replace oneor more elements in an HTML document, and/or move one or more elementsin an HTML document to another position in the document.

As another example, a set of client-side script transformationinstructions may be configured by a user to modify, remove, and/or addclient-side scripts in the response. By way of example, the set ofclient-side script transformation instructions may include instructionsto: remove all client-side scripts from the response so that only thecontent and styles (if available) are present, and/or remove theclient-side script onload from the response so that the client-sidescript does not immediately execute upon the page being loaded by theInternet client.

As another example, a set of optimization transformation instructionsmay be configured by a user to optimize the speed of processing of theresponse (e.g., by decreasing the amount of time necessary for initialpage loading, etc.). By way of specific example, the set of optimizationinstructions may include instructions to: download remote CSS and/orclient-side script files and inject their content into the responsethereby reducing the number of web requests that the Internet clientwill make (this will increase speed on a high latency network), remove aportion of the HTML page in the response and replace it with aclient-side script that fetches and injects the rest of the HTML therebyreducing the amount of time necessary to load the initial page, fetchHTML pages that the user is likely to select in the background and use aclient-side script to inject the already loaded page when the userclicks on the preloaded link, shrink the size of images, removeunnecessary HTML (e.g., remove comment blocks), remove dependencies onlarge libraries and replace with smaller optimized libraries, loadcontent later as the Internet client displays different parts of thepage, loading links in the background and storing the results, etc.

In one embodiment, transformation instructions to be applied to adomain, subdomain, and/or path, can be modified (e.g., the parameters inthe transformation instruction changed, re-ordering in thetransformation instruction list, etc.) created (e.g., newly applied tothe domain, subdomain, and/or path), and/or removed while the dynamicweb content transformation server 120 is executing. Thus, the dynamichosting server 120 does not need to be brought down for maintenance whenchanging the list of transformation instructions for a domain,subdomain, and/or path.

With reference to FIG. 1, in one embodiment the transformationinstruction editor 190 allows an operator of the dynamic web contenttransformation server 120 to create and configure the transformationinstructions (e.g., the rehosting transformation instructions, the CSStransformation instructions, the visual formatting transformationinstructions, the client-side script transformation instructions, and/orthe optimization transformation instructions).

In one embodiment, the transformation editor 190 is a web basedinterface that, for example, includes a text-editor for making real-timeCSS and client-side script modifications and for creating newinstructions, allows a user to select from a library of possibletransformation instructions and configure the instructions, and allows auser to view the web page and the applied transformations in real time.While FIG. 1 illustrates the transformation instruction editor 190 aspart of the dynamic web content transformation server 120, in otherembodiments the transformation instruction editor 190 is locatedremotely from the dynamic web content transformation server 120.

FIG. 8 illustrates an exemplary transformation editor 190 according toone embodiment. As illustrated in FIG. 8, the transformation editor 190includes the transformation instruction library 820, the transformationinstruction configuration panel 830, the applied transformation list835, and the preview pane 840, and an operator is configuringtransformation instructions for the HTML file located athttp://ishan.org/example.html (it should be understood that this URL isexemplary).

The transformation instruction library 820 lists a number of predefinedtransformation instructions that the operator of the dynamic web contenttransformation server 120 can select from to apply to the resource thatis loaded (in the example illustrated in FIG. 8 the resource is the HTMLfile at the location http://ishan.org/example.html). The predefinedinstructions may include the rehosting transformation instructions, theCSS transformation instructions, the visual formatting transformationinstructions, the client-side script transformation instructions, and/orthe optimization transformation instructions. In one embodiment, theinstructions listed in the transformation instruction library 820 arenot specifically designed for the resource in question. Rather, thetransformation instructions that correspond to the instructions listedin the transformation instruction library 820 are reusable acrossmultiple resources and websites. Although the transformationinstructions in the transformation instruction library 820 representpredefined transformation instructions (the code has already beenwritten to manipulate data in a predefined way), in one embodiment thetransformation instruction editor 190 includes a text-editor for makingreal-time modifications (such as CSS and client-side scriptmodifications) and for writing new instructions.

Each transformation instruction includes logic to locate and manipulatedata from an input source (typically from the response) in a predefinedway. At least some of the transformation instructions require one ormore parameters to be configured by an operator of the dynamic webcontent transformation server 120 (some transformation instructions donot require parameters or have optional parameters). The parametersconfigure the code in the transformation instruction. The transformationinstruction configuration panel 830 allows the operator to configure theparameters for the transformation instructions. As a result of anoperator selecting one of the transformation instructions in thetransformation instruction library 820, a list of arguments that need(or may) be configured for that transformation instruction is presentedto the operator in the transformation instruction configuration panel830. For example, as illustrated in FIG. 8, the CSS transformationinstruction AddCSS, which when provided a path to a remote CSS file andexecuted will add that CSS file to the page (e.g., at the end of theHEAD), has been selected by the operator from the transformationinstruction library 820 and a field for the operator to enter in theparameter for the path to the remote CSS file has been provided (e.g.,input the path of the remote CSS file). Instructions are also providedto indicate to the operator what the parameter is and what should beselected. It should be understood that different transformationinstructions may have different parameters (e.g., arguments) than othertransformation instructions.

In one embodiment, the transformation instruction configuration panel830 allows the operator to specify whether that transformationinstruction is to apply to different user-agents (e.g., different mobilebrowsers). For example, some Internet clients can run a limited subsetof client-side scripts or cannot run any client-side scripts, whileother Internet clients can run all (or most) client-side scripts. Toprovide for such a case, as one example an operator can configure atransformation instruction that will remove all client-side scripts fromthe page for only those requesting Internet clients that cannot run anyclient-side scripts (i.e., the transformation instruction to remove allclient-side scripts is only applicable to identified user-agents (itwill not be applied to the other user-agents)).

In one embodiment, the transformation instruction configuration panel830 allows the operator to specify whether that transformationinstruction is cacheable (e.g., whether the result of the transformationinstruction can be cached or should be executed again). By way ofexample, the operator may determine that user related or session relatedtransformation instructions are not cacheable.

The applied transformation instruction list 835 displays an ordered listof transformation instructions (including their configured parameters)that will be applied to the resource. For example, the appliedtransformation instruction list 835 as illustrated in FIG. 8 includesthe CSS transformation instruction RemoveCSS (which will remove the CSSfrom the page) and the CSS transformation instruction AddCSS, applied inthat order. It should be understood that if the AddCSS instruction wasapplied before the RemoveCSS instruction, the RemoveCSS would remove theCSS style that was applied by the AddCSS transformation instruction. Theapplied transformation instruction list 835 also allows the operator tochange the order of the transformation instructions and allows theoperator to remove a transformation instruction permanently ortemporarily.

In one embodiment, the transformation instruction editor 190 includesthe preview pane 840 to allow the operator to preview the result of thetransformation instructions that are applied. For example, FIG. 8illustrates the result of the RemoveCSS transformation instruction andthe AddCSS transformation instruction applied to the page located athttp://ishan.org/example.html. Thus, as the operator is configuring thetransformation instructions for a web page, the operator can quickly seethe results of the transformation. Although FIG. 8 illustrates thepreview pane 840 being located on the same page as the rest of thetransformation instruction editor 190, in other embodiments the previewpane is located on a separate tab.

With respect to the exemplary transformation instruction editor 190,individual transformation instructions are referred to as blocks. Agroup of one or more ordered transformation instructions are referred toas blocksets, which may be defined by an operator of the editor. Forexample, with reference to FIG. 8, the operator may create the blocksetAddCSSExample which includes the RemoveCSS transformation instructionfollowed by the AddCSS transformation instruction.

In one embodiment, the transformation instruction editor 190 allows theoperator to configure URL mappings to indicate which transformationinstructions are to be applied for a given URL. For example, when aresponse (e.g., the response 184) is received from an origin server, thedynamic web content transformation server 120 compares the URL of theresponse against the URL mappings to determine which transformationinstructions are to be executed. In one embodiment, each URL mappingincludes a blockset property, which indicates a name of a blockset thatwill be applied, a domain property that indicates a domain value for themapping, a regular expression to identify particular URLs within thedomain for the mapping, a support list that indicates one or moreproperties of the requesting computing device (the support list isoptional), and an order number that indicates an order in whichdifferent URL mappings are to be applied.

FIG. 9 illustrates an exemplary URL mapping configuration windowaccording to one embodiment. The URL mapping configuration window 910,which is launched by the operator selecting the URL mapping tab 865,includes the blockset name field 915, the order field 920, the domainfield 925, the regular expression (regex) field 930, and the supportlist field 935. As illustrated in FIG. 9, the domain field 925 includesa value of ishan.org. Thus, in order for a URL to match this mapping itmust have a domain value of ishan.org. The regular expression field 930has a value of (example|foo|bar).html. Thus, in order for a URL having adomain value of ishan.org to match this mapping, it must include eitherexample.html, foo.html, or bar.html. The support list field 935 includesa value of os=blackberry, which indicates that only BlackBerry computingdevices will match the mapping. This allows the operator to tailor themapping to a specific device or a class of devices.

After the operator is finished configuring the transformationinstructions, the operator can save the list of instructions (as orderedin the applied transformation instruction list 835) such that they willbe applied for the matching URL mapping by selecting the Save button870. In one embodiment the list of instructions to be applied for thedomain, subdomain, and/or path are transmitted to the dynamic webcontent transformation server 120 and/or the transmitted and stored inthe transformation instructions database 140.

FIG. 10 is a flow diagram illustrating exemplary operations performed bythe dynamic web content transformation server 120 to dynamicallytransform web content according to one embodiment. The operations ofFIG. 10 will be described with reference to the exemplary embodiment ofFIG. 1. However, it should be understood that the operations of FIG. 10can be performed by embodiments of the invention other than thosediscussed with reference to FIG. 1, and the embodiments discussed withreference to FIG. 1 can perform operations different than thosediscussed with reference to FIG. 10. In addition, the operations of FIG.10 will be described with reference to modifying a response receivedfrom an origin server (the request may be modified as describedpreviously with respect to FIG. 2).

At operation 1010, the dynamic web content transformation server 120receives a response from the origin server 120 (similar to the operation510). Flow then moves to operation 1015 where the dynamic web contenttransformation server 120 analyzes the response and determines which oneor more transformation instructions will be applied to identifiedportion(s) of the response. For example, the response module 170accesses the URL mappings and compares the URL of the response againstthe URL mappings to determine which transformation instruction(s) areconfigured to be potentially applied to modify the response. In oneembodiment, these transformation instructions include one or more of:the rehosting transformation instructions, the CSS transformationinstructions, the visual formatting transformation instructions, theclient-side script transformation instructions, and/or the optimizationtransformation instructions. Flow moves from operation 1015 to operation1020.

At operation 1020, the response module 170 applies the list oftransformation instructions, in order, to the identified portion(s) ofthe response 184. For example, for each transformation instruction, theresponse module 170 scans through the response 184 and performs theappropriate manipulations to the response 184.

In one embodiment, for each transformation instruction, the responsemodule 170 performs the additional step to determine whether thattransformation instruction is applicable for the requesting computingdevice. For example, as previously described, the response module 170may apply certain transformation instructions only for certainUser-Agents. Thus the response module 170 may examine the User-Agent ofthe requesting computing device to determine whether a particulartransformation instruction should be applied. If a particulartransformation instruction is not applicable for the requestingUser-Agent, that transformation instruction will not be applied. Asanother example, the response module 170 may also determine whether atransformation instruction is applicable based on a cookie included inthe request.

After each of the transformation instructions have been processed, flowmoves to operation 1025 where the response module 170 renders themodified response and causes it to be transmitted to the Internet client110. The portion(s) of the response which have not been transformed(e.g., they did not match the rules for any transformation instructions)are included in the rendered response. Thus, unlike mobile conversiontechniques that require the use of custom templates and customextraction code to transform the content, in embodiments of theinvention element(s) that do not match a transformation instruction areincluded in the rendered response (in the case of a custom templatetechnique, elements that are not extracted and put in a template are notincluded in the response).

The following FIGS. 11-24 describe exemplary transformation instructionsthat may be applied. For the purpose of the following exemplarytransformation instructions, the exemplary file is example.html (locatedat http://ishan.org/example.html) and its contents are shown in FIG. 11.Example.html includes a reference to a CSS file example.css, whosecontents are shown in FIG. 12. FIG. 13 illustrates the rendered view ofthe HTML page prior to any transformation instructions being applied.

The RemoveElements transformation instruction removes one or moreelements from the HTML document. The RemoveElements transformationinstruction is an example of a type of visual formatting transformationinstruction. The RemoveElements transformation instruction includes anargument, which is typically supplied by an operator duringconfiguration (e.g., through the transformation instructionconfiguration panel 830), which indicates which HTML element(s) is/areto be removed. By way of example, the RemoveElements transformationinstruction has been configured to remove the “beta” div fromexample.html.

In order to apply the RemoveElements transformation instruction, theresponse module 170 is passed a current representation of the HTMLdocument example.html. The current representation of the HTML documentincludes the result of previous transformations applied to the HTMLdocument. The response module 170 scans through the currentrepresentation of the HTML document to locate the HTML element(s) thatare to be removed from the HTML document. In one embodiment the responsemodule 170 uses a parser that can search documents via XPath (XML PathLanguage) or CSS selectors. In one embodiment, if a matching HTMLelement is not found, an error message is reported to the system (anerror message will not be displayed to the end user). If a matchingelement is found, the response module 170 modifies the HTML page byremoving that element from the HTML. FIG. 14 illustrates theexample.html source after the RemoveElements transformation instructionhas been applied. As illustrated in FIG. 14, the “beta” div has beenremoved from the example.html document. FIG. 15 illustrates the renderedview of the HTML page after the RemoveElements transformationinstruction has been applied.

As another specific example of a transformation instruction, theMoveBefore transformation instruction moves an element to a new positionin the document that is directly before another element in the document.The MoveBefore transformation instruction is a type of visual formattingtransformation instruction. The MoveBefore transformation instructiontakes at least two parameters, which are typically supplied by anoperator during configuration (e.g., through the transformationinstruction configuration panel 830). One parameter indicates the HTMLelement that is to be moved (the “move-me” element) and the otherparameter indicates the HTML element that the move-me element will beplaced directly before the document (the “before-me” element). By way ofexample, the MoveBefore transformation instruction has been configuredto move the “beta” div before the “alpha” div in the example.htmlillustrated in FIG. 11.

In order to apply the MoveBefore transformation instruction, theresponse module 170 is passed a current representation of the HTMLdocument example.html. The response module 170 scans through the currentrepresentation of the HTML document to locate the HTML element thatcorresponds to the move-me element and locate the HTML element thatcorresponds to the before-me element. In one embodiment, if matchingHTML element(s) are not found, an error message is reported to thesystem (an error message will not be displayed to the end user). If themove-me element and before-me element are located, the response module170 modifies the HTML page by inserting the move-me element directlybefore the before-me element and removing the move-me element from itsoriginal position. With reference to a DOM (Document Object Model)representation of the HTML document, the move-me element will beinserted as a sibling of the before-me element but it will be insertedso that it is just before the before-me element in a list of before-mesiblings. FIG. 16 illustrates the example.html source after theMoveBefore transformation instruction has been applied. As illustratedin FIG. 16, the “beta” div element has been moved directly before the“alpha” div element. FIG. 17 illustrates the rendered view of the HTMLpage after the MoveBefore transformation instruction has been applied.

It should be understood that other types of transformation instructionscan be configured to move content from its original location in theresponse to another location, or move one or more attributes from anelement to another element. For example, a MoveAfter transformationinstruction moves a first element (typically specified by the operator)directly after a second element (also typically specified by theoperator). As another example, a MoveAttributeToParent transformationinstruction moves an attribute (e.g., the value of an “onclick”)(typically specified by the operator) from a child element to its parentelement. As another example, a MoveToBeginningOf transformationinstruction moves an element (typically specified by the operator) tothe first child of another element (also typically specified by theoperator). As another example, a MoveToEndOf transformation instructionmoves an element (typically specified by the operator) to the last childof another element (also typically specified by the operator).

As another specific example of a transformation instruction, theRemoveCSS transformation instruction removes all CSS styling from anHTML document. The RemoveCSS transformation instruction is a type of CSStransformation instruction. The RemoveCSS instruction does not take anyparameters. The response module 170 scans through the currentrepresentation of the HTML document to locate any CSS styling in thedocument. For example, the response module 170 finds all <STYLE>elements, and <LINK> elements that have a “rel” attribute set to“stylesheet” (which indicates that it is an external CSS stylesheet).The response module 170 removes each of these elements from the HTMLsource code. FIG. 18 illustrates the example.html document after theRemoveCSS transformation instruction has been applied. As illustrated inFIG. 18, the <LINK> element has been removed from the document. FIG. 19illustrates the rendered view of the example.html document after theRemoveCSS transformation instruction has been applied.

As another specific example of a transformation instruction, the AddCSStransformation instruction adds CSS styling to an HTML document. TheAddCSS transformation instruction is a type of CSS transformationinstruction. The AddCSS transformation instruction takes a parameter toindicate the URL of a file that contains the CSS styling to add. By wayof example, the URL of the file that contains the CSS styling is locatedat http://ishan.org/alternate_example.css, and whose content isillustrated in FIG. 20. Typically the AddCSS transformation instructionis applied after the RemoveCSS transformation instruction has beenapplied and removed the original CSS styling from the HTML document. Forexample, the CSS file that is added may be designed specifically formobile viewing.

In order to apply the AddCSS transformation instruction to the HTMLdocument example.html, the response module 170 is passed a currentrepresentation of that document and creates a new <LINK> element andsets the “rel” attribute to “stylesheet”, sets the “type” attribute to“text/css”, and sets the “href” attribute to the value of the URL thatcontains the CSS styling to be added. The created <LINK> element isinserted at the end of the document's <HEAD> element. This exampleassumes that the original CSS styling (illustrated in FIG. 12) has beenremoved (e.g., by the RemoveCSS transformation instruction). FIG. 21illustrates the example.html document source after the AddCSStransformation instruction has been applied. FIG. 22 illustrates therendered view of the HTML page after the AddCSS transformationinstruction has been applied.

As another specific example of a transformation instruction, theInlineCSS transformation instruction inserts the content of an externalCSS file directly into an HTML document. The InlineCSS transformationinstruction is a type of optimization transformation instruction. Bymoving the CSS inline, the total number of requests the Internet clienthas to make is reduced and potentially causes the page to load quicker.The InlineCSS transformation instruction takes one parameter thatindicates the <LINK> element that will be inlined (the parameter iseither a CSS or XPATH selector for the <LINK> element). By way ofexample, the InlineCSS transformation instruction has been configured toinsert the content of the external CSS file illustrated in FIG. 12 intothe example.html document.

In order to apply the InlineCSS transformation instruction to theexample.html document, the response module 170 is passed a currentrepresentation of the document and locates all <LINK> elements thatmatch the selector parameter configured by the operator, contain a valid“href” attribute, and either have no “rel” attribute or have a “rel”attribute with the value “stylesheet”. For each of these elements, theexternal CSS file is downloaded. For those external CSS files that aredownloaded successfully, the response module 170 inserts a new <STYLE>element into the <HEAD> of the document, which contains the downloadedCSS file. The original <LINK> element is removed. With respect to theexample.html document illustrated in FIG. 11, the CSS style example.css(illustrated in FIG. 12) is downloaded and the code is inserted into theexample.html document. FIG. 23 illustrates the example.html documentsource after the InlineCSS transformation has been applied. FIG. 24illustrates the rendered view of the HTML page after the InlineCSStransformation has been applied.

Transformation instructions may also add features that are not otherwisefound in the response (e.g., location features (e.g., maps, etc.), HTML5features (e.g., local storage on the computing device), sharing features(e.g., social networking, blogging, microblogging, etc.), features foroptimal mobile web viewing, etc.). As a specific example, the Accordiontransformation instruction adds CSS to hide content of an HTML documentbehind its associated header, and adds a client-side script to revealthe content when the associated header is selected by a user. This canimprove the readability and usability of the website on a mobile devicethat has a relatively smaller screen size than other computing devices.For example, after the Accordion transformation instruction is applied,users can scroll the entire page more quickly and reveal only thecontent in which they are interested in. The Accordion transformationinstruction takes two parameters, which may be configured by theoperator using the transformation instruction configuration panel 830.One parameter indicates the HTML element(s) that will be hidden(referred as the “content-selector”), which will be revealed when a userselects the associated element. One parameter indicates the HTMLelement(s) that will be made selectable to reveal the associated hiddenelements (referred as the “link-selector”). In one embodiment, thelink-selector and the content-selector are both CSS selectors, and havea one to one relationship (i.e., there is a single link-selectorassociated with a single content-selector).

To apply the Accordion transformation instruction, the response module170 finds all the HTML elements referenced by the link-selector(referred to as “link-elements”) and finds all the HTML elementsreferenced by the content-selector (referred to as “content-elements”).The response module 170 hides the content-elements by adding a“style=‘display:none” attribute to these elements. The response module170 associates the first link-element with the first content-element,associates the second link-element with the second content-element, andso on. The response module 170 also adds an “onclick” attribute to eachlink-element that references an added client-side script that togglesthe display of the associated content-element (e.g., by toggling between“style=‘display:none” and “style=‘display:block’”).

FIG. 25 illustrates an exemplary HTML document source where theAccordion transformation instruction will be applied. The exemplary HTMLdocument source illustrated in FIG. 25 includes the link-elements 2520and 2530, and the content-elements 2525 and 2535. FIG. 26 illustratesthe exemplary HTML document source illustrated in FIG. 25 rendered(prior to the Accordion transformation instruction being applied). Inorder to apply the Accordion transformation instruction to the exemplaryHTML document illustrated in FIG. 25, the response module 170 locatesall the link-elements (link-elements 2520 and 2530) and thecontent-elements (content-elements 2525 and 2530), adds a“style=‘display:none’” attribute to the content elements, and adds an“onclick” attribute to the link-elements 2520 and 2530 that referencesan added client-side script that, when selected by the user, toggles thedisplay of the content-elements 2525 and 2535 respectively.

FIGS. 27A-B illustrate the exemplary HTML document source after theAccordion transformation is applied. In particular, FIG. 27A includesJavaScript to effect the toggling nature of the accordion construct. Asillustrated in FIG. 27B, the link-elements 2520 and 2530 have beenmodified to include an “onclick” attribute that refers to the JavaScriptillustrated in FIG. 27A, and the content-elements 2525 and 2535 havebeen modified with the addition of a “style=‘display:none’” attribute.FIG. 28 illustrates a rendered view of the HTML document after theAccordion transformation is applied. The headers “First line” and“Second line” are concealing content. When selected, they will revealthe concealed content. For example, FIG. 29 illustrates a rendered viewof the HTML document after the Accordion transformation is applied andafter a user has selected the header “First line,” which causes thehidden content to be revealed.

With reference back to the exemplary transformation instruction editor190, it also includes the ability for the operator to cache the resourcewhile configuring the transformation instructions for that resource.Thus instead of working on the live version of a resource such as a webpage (which may include downloading the resource multiple times whentesting the configuration), the resource is downloaded once from theorigin server while being configured. For example, the Toggle FreezeProxy 850 allows the operator to toggle between working on a cachedversion of the resource and a live version of the resource. The ClearFreeze Proxy Cache 855 allows the operator to clear the cached versionthereby causing the resource to be downloaded anew on the next request.

In one embodiment, on each response that is dynamically modified, thedynamic web content transformation server 120 writes a report describinghow long the transformation took on each transformation instruction andwhether any errors have occurred. In one embodiment, the reports aregenerated and stored in the report database 195. In some embodiments thereports are emailed or otherwise available to the operator of thedynamic web content transformation server 120. For example, the reportsare available for viewing using the report tab 860 of the transformationinstruction editor 190.

After the transformation instructions are configured for a givenresource or group of resources, the automatic and dynamic determinationand application of transformation instructions to modify web responsesreduces the complexity of configuration and maintenance that isassociated with other techniques that involve the use of customtemplates in order to format a mobile page. For example, in contrastwith a custom-template technique, if a new feature is added to anon-mobile page, that feature will appear on the mobile version of thepage even if there is not a transformation instruction that isconfigured for the new feature (often a transformation instruction willalready be configured and apply to the new feature). Thus, usingembodiments of the invention, an operator or websiteadministrator/developer does not need to take time to create additionalcustom templates and custom extraction code each time a feature is addedin order for that feature to appear on the mobile version of the page.

In addition, since the underlying code for the transformationinstructions is predefined, the transformation instruction editor 190can be used by designers or other people that are not softwareprogrammers or highly technical personnel. Thus, changes in determiningwhich transformation instructions are to apply to which domains,subdomains, and/or paths can be quickly implemented both by websitedesigners or other people that are not technical personnel or familiarwith software programming.

In addition, unlike automatic mobile conversion techniques that removeall client-side scripts and do not support cookies, the dynamicrehosting mobile conversion technique described herein supportsclient-slide scripts (if supported by the requesting computing device)and supports the use of cookies. Thus, using embodiments of theinvention described herein, the mobile version of a website functions ina similar way as the non-mobile version.

While specific examples of transformation instructions have beendescribed herein, it should be understood that these are not meant to belimiting as there are many other transformation instructions that may beapplied to convert a resource of one type suitable for viewing/use on aclass of device (e.g., a non-mobile resource for viewing/use on a devicesuch as a desktop or laptop) into a form suitable for viewing/use on adifferent class of device (e.g., into a form suitable for viewing/use ona mobile browser of a computing device, into a form suitable forviewing/use on a set-top box, kiosk, or other class of computing devicethat has different user interface characteristics and/or devicecapabilities than the resource was originally designed for).

In some embodiments the dynamic web content transformation server 120can request multiple web pages from multiple hosts and cause them to bedisplayed side-by-side in the same page on the same domain (e.g.,without using iframes). This may allow the creation of an aggregation ofrelated content from multiple sources. For example, an aggregatedcontent page can include a map of houses for sale from a real estatewebsite on the same page as a map and/or listing of criminal incidentsfor the same region from a local law enforcement website.

In addition, in some embodiments, the dynamic web content transformationserver 120 can provide an API (e.g., SOAP (Simple Object AccessProtocol), REST (Representational State Transfer), or other InternetAPI) based on the data that is pulled from web pages and/or websites.This allows certain websites to be read and used by devices andapplication interfaces that do not include a web browser or are not aweb browser. For example, on some smartphones there is a default searchinterface (which by itself is not a browser). By using the API, anoperator can configure page requests received from the default searchinterface application to submit the search word to a website (e.g., ifsearching for a definition, the word can be transmitted to an onlinedictionary), receive and extract the results from the search and returnthem back to the application (e.g., in XML format) to be displayed tothe user.

As described herein, instructions may refer to specific configurationsof hardware such as application specific integrated circuits (ASICs)configured to perform certain operations or having a predeterminedfunctionality or software instructions stored in memory embodied in anon-transitory computer readable medium. Thus, the techniques shown inthe figures can be implemented using code and data stored and executedon one or more computing devices (e.g., a mobile computing device, adynamic web content transformation server, etc.). Such computing devicesstore and communicate (internally and/or with other computing devicesover a network) code and data using computer-readable media, such asnon-transitory computer-readable storage media (e.g., magnetic disks;optical disks; random access memory; read only memory; flash memorydevices; phase-change memory) and transitory computer-readablecommunication media (e.g., electrical, optical, acoustical or other formof propagated signals—pmd such as carrier waves, infrared signals,digital signals). In addition, such computing devices typically includea set of one or more processors coupled to one or more other components,such as one or more storage devices (non-transitory machine-readablestorage media), user input/output devices (e.g., a keyboard, atouchscreen, and/or a display), and network connections. The coupling ofthe set of processors and other components is typically through one ormore busses and bridges (also termed as bus controllers). Thus, thestorage device of a given computing device typically stores code and/ordata for execution on the set of one or more processors of thatcomputing device. Of course, one or more parts of an embodiment of theinvention may be implemented using different combinations of software,firmware, and/or hardware.

While embodiments have been described herein as performing dynamic webcontent transformation on behalf of website(s) at a server that is notowned or directly controlled by those website(s), embodiments are not solimited. For example, in some embodiments the dynamic web contenttransformation for resources of a domain, subdomain, and/or path isperformed on a server that is directly associated with that domain,subdomain, and/or path. For example, in one embodiment an origin serveris configured to perform dynamic web content transformation for some ofits resources depending on whether the incoming request has been sentfrom a mobile device.

FIG. 30 is a flow diagram that illustrates exemplary operationsperformed on an origin server for dynamically transforming web contentaccording to one embodiment. At operation 3010, the origin serverreceives a request from an Internet client to perform an action on ahosted resource (a resource that is local to the origin server). Forexample, the origin server receives an HTTP request or a web page thatis hosted by the origin server. Flow moves from operation 3010 tooperation 3020.

At operation 3020, the origin server determines whether the request isfrom a mobile device (e.g., a smartphone, a PDA, a portable mediaplayer, a GPS device, a gaming device, etc.) and/or is requesting amobile version of the resource. The origin server may determine that therequest is for a mobile version based on the URL of the resource. Forexample, the website associated with the origin server may use aparticular naming convention for mobile versions of its pages (e.g.,http://m.example.com may refer to the mobile version ofhttp://example.com) such that if the request matches that namingconvention, the request is for a mobile version of the resource. Theorigin server may also determine that the request is for a mobileversion (or from a mobile device) based on the User-Agent of therequesting Internet client (the User-Agent may identify that therequesting computing device is a mobile device and/or using amobile-browser). As another example, the origin server may alsodetermine that the request is for a mobile version (or from a mobiledevice) based on the value of a cookie being sent by the requestingcomputing device. If the request is from a mobile device and/or isrequesting a mobile version of the resource, flow moves to operation3025; otherwise flow moves to 3070 where the request is processed in aregular way for non-mobile devices and/or non-mobile Internet clients.

At operation 3025, the origin server accesses the requested resource,and flow moves to operation 3030. Since the requested resource is hostedby the origin server, it can typically access the requested resourcewithout making an external request. At operation 3030, the origin serverdetermines one or more transformation instructions to apply toidentified portion(s) of the resource. For example, the origin servercompares the URL of the resource against a list of URL mappings todetermine which transformation instruction(s) are applicable for theresource. The one or more transformation instructions may include one ormore of the rehosting transformation instructions, the CSStransformation instructions, the visual formatting transformationinstructions, the client-side script transformation instructions, and/orthe optimization transformation instructions that are described herein.In one embodiment these transformation instructions are configured by anoperator of the origin server using a transformation instruction editorsuch as the editor 190 described herein.

Flow then moves to operation 3040 and the origin server applies thedetermined transformation instructions to identified portion(s) of theresource (in a similar way as previously described herein). Flow thenmoves to operation 3050 and the origin server renders a web response(e.g., an HTTP response) that includes the resource as it has beentransformed by application of the transformation instructions. Theportion(s) of the resource which have not been transformed are alsoincluded in the response. Flow then moves to operation 3060 and theresponse is transmitted to the requesting Internet client.

In one embodiment, the origin server may cache the mobile version of therequested resource (which will include any transformations necessary).In such an embodiment and if there is a cached mobile version, theorigin server accesses the cached version (assuming that it is stillfresh) and returns that cached version to the requesting computingdevice (thereby bypassing any additional transformation operations).

FIG. 31 is a block diagram illustrating an exemplary computer systemwhich may be used in some embodiments. For example, the exemplaryarchitecture of the computer system 3100 may be included in thecomputing device 105, the dynamic web content transformation server 120,the origin server 130, and/or other computing devices described herein.It should be understood that while FIG. 31 illustrates variouscomponents of a computer system, it is not intended to represent anyparticular architecture or manner of interconnecting the components assuch details are not germane to the present invention. It will beappreciated that other computer systems that have fewer components ormore components may also be used.

As illustrated in FIG. 31, the computer system 3100, which is a form ofa data processing system, includes the bus(es) 3150 which is coupledwith the processing system 3120, power supply 3125, memory 3130, and thenonvolatile memory 3140 (e.g., a hard drive, flash memory, Phase-ChangeMemory (PCM), etc.). The bus(es) 3150 may be connected to each otherthrough various bridges, controllers, and/or adapters as is well knownin the art. The processing system 3120 may retrieve instruction(s) fromthe memory 3130 and/or the nonvolatile memory 3140, and execute theinstructions to perform operations as described herein (e.g., apply thetransformation instructions described herein). The bus 3150interconnects the above components together and also interconnects thosecomponents to the optional dock 3160, the optional display controller &display device 3170, Input/Output devices 3180 (e.g., NIC (NetworkInterface Card), a cursor control (e.g., mouse, touchscreen, touchpad,etc.), a keyboard, etc.), and the optional wireless transceiver(s) 3190(e.g., Bluetooth, WiFi, Infrared, etc.).

While some embodiments have been described with reference totransforming a non-mobile page to a mobile page suitable for a mobiledevice, the techniques described herein are applicable to other types oftransformation from one format to another format. For example, using thetransformation instructions described herein, original web content canbe dynamically transformed based on the requirements of the requestingcomputing device and/or Internet client, or based on a custom preferenceof either the original web content provider or the user of therequesting computing device.

While the flow diagrams in the figures show a particular order ofoperations performed by certain embodiments of the invention, it shouldbe understood that such order is exemplary (e.g., alternativeembodiments may perform the operations in a different order, combinecertain operations, overlap certain operations, etc.).

While the invention has been described in terms of several embodiments,those skilled in the art will recognize that the invention is notlimited to the embodiments described, can be practiced with modificationand alteration within the spirit and scope of the appended claims. Thedescription is thus to be regarded as illustrative instead of limiting.

1. A method for dynamically transforming web content, the methodcomprising: receiving from an Internet client an HTTP request to beperformed on an web resource; accessing the web resource identified inthe HTTP request; analyzing the content of the web resource; applying aset of one or more of a plurality of transformation instructions on aset of one or more identified portions of the content of the resource,wherein each applied transformation instruction includes logic to locateand manipulate at least an identified portion of the content, wherein atleast one of the set of transformation instructions is a client-sidescript transformation instruction that performs one or more of modify aclient-side script included in the content, remove a client-side scriptincluded in the content, and add a client-side script to the content;rendering an HTTP response that includes the results of the appliedtransformation instructions and further includes those portions of thecontent that were not manipulated by any transformation instruction; andtransmitting the response to the Internet client.
 2. The method of claim1, wherein accessing the web resource includes the following:transmitting the HTTP request to an origin server that is hosting theweb resource; and receiving an HTTP response from the origin server thatincludes the web resource.
 3. The method of claim 1, wherein accessingthe web resource includes locally accessing the web resource.
 4. Themethod of claim 1, wherein at least one of the set of transformationinstructions is a visual formatting transformation instruction thatmodifies the visual appearance of the resource when rendered by theInternet client.
 5. The method of claim 1, wherein at least one of theset of transformation instructions is a CSS (Cascading Style Sheets)transformation instruction that performs one of: modify a CSS filereferenced in the web resource, remove a CSS file referenced in the webresource, and add a CSS file to the web resource.
 6. The method of claim1, wherein at least one of the set of transformation instructions is anoptimization transformation instruction to improve the speed at whichthe resource is rendered at the Internet client.
 7. A computing deviceto provide a tool for creating and configuring transformationinstructions for dynamically transforming web content, the computingdevice comprising: a dynamic web content transformation instructioneditor to include the following: a dynamic web content transformationinstruction library to list a plurality of predefined dynamic webcontent transformation instructions that are each selectable by anoperator for application on one or more of a domain, subdomain, andpath, wherein each dynamic web content transformation instructionincludes predefined logic to locate and manipulate an identified portionof web content in a predefined way; a transformation configuration panelto allow configuration parameters for at least some of those dynamic webcontent transformation instructions that are selected from the dynamicweb content transformation instruction to be configured by the operator;and an applied transformation instruction list to display an orderedlist of transformation instructions that will be applied to the one ormore of the domain, subdomain, and path;
 8. The computing device ofclaim 7, wherein the dynamic web content transformation instructionlibrary includes one or more visual formatting transformationinstructions that each modify the visual appearance of a web resourcewhen that web resource is rendered by an Internet client.
 9. Thecomputing device of claim 7, wherein the dynamic web contenttransformation instruction library includes one or more CSS (CascadingStyle Sheets) transformation instructions that each performs one of:modify a CSS file referenced in a web resource, remove a CSS filereferenced in a web resource, and add a CSS file to a web resource. 10.The computing device of claim 7, wherein the dynamic web contenttransformation instruction library includes one or more optimizationtransformation instructions to improve the speed at which a resource isrendered at an Internet client.
 11. The computing device of claim 7,wherein the dynamic web content transformation instruction editorfurther includes a preview pane to allow the operator to preview resultsof the applied transformation instructions.
 12. A non-transitorycomputer-readable storage medium that provides instructions that, whenexecuted by a processor, will cause said processor to perform operationscomprising: receiving from an Internet client an HTTP request to beperformed on an web resource; accessing the web resource identified inthe HTTP request; analyzing the content of the web resource; applying aset of one or more of a plurality of transformation instructions on aset of one or more identified portions of the content of the resource,wherein each applied transformation instruction includes logic to locateand manipulate at least an identified portion of the content, wherein atleast one of the set of transformation instructions is a client-sidescript transformation instruction that performs one or more of modify aclient-side script included in the content, remove a client-side scriptincluded in the content, and add a client-side script to the content;rendering an HTTP response that includes the results of the appliedtransformation instructions and further includes those portions of thecontent that were not manipulated by any transformation instruction; andtransmitting the response to the Internet client.
 13. The non-transitorycomputer-readable storage medium of claim 12, wherein accessing the webresource includes the following: transmitting the HTTP request to anorigin server that is hosting the web resource; and receiving an HTTPresponse from the origin server that includes the web resource.
 14. Thenon-transitory computer-readable storage medium of claim 12, whereinaccessing the web resource includes locally accessing the web resource.15. The non-transitory computer-readable storage medium of claim 12,wherein at least one of the set of transformation instructions is avisual formatting transformation instruction that modifies the visualappearance of the resource when rendered by the Internet client.
 16. Thenon-transitory computer-readable storage medium of claim 12, wherein atleast one of the set of transformation instructions is a CSS (CascadingStyle Sheets) transformation instruction that performs one of: modify aCSS file referenced in the web resource, remove a CSS file referenced inthe web resource, and add a CSS file to the web resource.
 17. Thenon-transitory computer-readable storage medium of claim 12, wherein atleast one of the set of transformation instructions is an optimizationtransformation instruction to improve the speed at which the resource isrendered at the Internet client.